package controllers;

import play.mvc.Http.Context;
import play.mvc.Result;
import play.mvc.Security;

public class Secured extends Security.Authenticator {

	public String getUsername(Context ctx) {
		return ctx.session().get("login");
	}

	public Result onUnauthorized(Context ctx) {
		return redirect(controllers.routes.Application.login());
	}
}
